import request from '@/utils/request'

// 根据id查询详细信息
export function getDetailByApplyCode(id) {
  return request({
    url: `/api/v1/shopRebate/queryByRebateApplyCode/${id}`,
    method: 'get'
  })
}

// 返利变更编辑
export function saveChangeRule(data) {
  return request({
    url: '/api/v1/shopRebateChange',
    method: 'put',
    data
  })
}

// 根据id查询变更核算信息
export function getDetailById(id) {
  return request({
    url: `/api/v1/shopRebateChange/queryById/${id}`,
    method: 'get'
  })
}

// 审核
export function saveAudit(data) {
  return request({
    url: `/api/v1/shopRebateChange/checkShopRebateChange`,
    method: 'put',
    data
  })
}

// 终止
export function terminal(data) {
  return request({
    url: `/api/v1/shopRebateChange/stopShopRebateChange`,
    method: 'post',
    data
  })
}
